package com.shopuser.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.shopuser.dao.ShopUserMapper;
import com.shopuser.pojo.ShopUser;
@Service("userService")
public class ShopUserServiceImpl implements ShopUserServiceI{
		
	@Autowired
	private ShopUserMapper usermapper;
	
	
	@Override
	public void addUser(ShopUser user) {
		usermapper.insert(user);
		
	}


	@Override
	public ShopUser getUserById(int userId) {
		// TODO Auto-generated method stub
		return usermapper.selectByPrimaryKey(userId);
	}


	@Override
	public List<ShopUser> getAllUser() {
		// TODO Auto-generated method stub
		return usermapper.getAllUser();
	}


	@Override
	public String login(ShopUser user) {
		// TODO Auto-generated method stub
		return usermapper.login(user);
	}

	

}
